﻿<controls:ChildWindow x:Class="SUMO.MediaBrowser.Controls.Umbraco.ImageEditor"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           mc:Ignorable="d"
           d:DesignHeight="562" d:DesignWidth="702"
           Title="Image Editor"
		   xmlns:adorners="clr-namespace:SUMO.MediaBrowser.Controls.Adorners;assembly=Adorners" 
           xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" Width="702" Height="562">

<Controls:BusyIndicator>
    <Grid x:Name="LayoutRoot" Margin="2">
    	<Grid.RowDefinitions>
    		<RowDefinition />
            <RowDefinition Height="Auto" />
    	</Grid.RowDefinitions>
		
		<Grid Margin='8,36,8,8' Canvas.ZIndex="1">
			<ScrollViewer Padding="5,5,5,5" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto	">		
            	<Grid Name="ImageCanvas" VerticalAlignment="Top" HorizontalAlignment="Left">
                	<Image x:Name="EditorImage" MouseLeftButtonDown="Image_MouseLeftButtonDown" />
                	<Canvas Name="EditorPane">
                    	<adorners:CursorPlane x:Name='cursorPlane'  />
                	</Canvas>
            	</Grid>       	
			</ScrollViewer>
        </Grid>
		
		<controls:TabControl Margin="5" Grid.Row="0" >
			<controls:TabItem Header="View" MouseLeftButtonUp="ViewTabItem_MouseLeftButtonUp">
				<Grid/>
			</controls:TabItem>
			<controls:TabItem Header="Crop" MouseLeftButtonUp="CropTabItem_MouseLeftButtonUp"/>
		</controls:TabControl>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0" Grid.Row="1" VerticalAlignment="Bottom" />
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,0,79,0" Grid.Row="1" VerticalAlignment="Bottom" />
        <Button x:Name="RotateButton" Content="Rotate" Click="RotateButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,0,158,1" Grid.Row="1" VerticalAlignment="Bottom" />
        <Button x:Name="FlipHButton" Content="Flip H" Click="FlipHButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,0,237,1" Grid.Row="1" VerticalAlignment="Bottom" />
        <Button x:Name="FlipVButton" Content="Flip V" Click="FlipVButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,0,316,1" Grid.Row="1" VerticalAlignment="Bottom" />
    </Grid>
	</Controls:BusyIndicator>
</controls:ChildWindow>